Coverlet Intergration with VSTest#410
Conversation
src/coverlet.collector/DataCollector/CoverletCoverageDataCollector.cs
Outdated
Show resolved
Hide resolved
src/coverlet.collector/DataCollector/CoverletCoverageDataCollector.cs
Outdated
Show resolved
Hide resolved
src/coverlet.collector/DataCollector/CoverletCoverageDataCollector.cs
Outdated
Show resolved
Hide resolved
|
|
||
| // Note: | ||
| // 1) .NET core test run supports one testModule per run. Coverlet also supports one testModule per run. So, we are using first testSource only and ignoring others. | ||
| // 2) If and when .NET full is supported with coverlet OR .NET core starts supporting multiple testModules, revisit this code to use other testModules as well. |
There was a problem hiding this comment.
We support .NET Full...but not multiple tests modules AFAIK cc: @tonerdo
src/coverlet.collector/DataCollector/CoverletCoverageDataCollector.cs
Outdated
Show resolved
Hide resolved
|
I did a part of review(until |
tonerdo
left a comment
There was a problem hiding this comment.
LGTM! Module two comments
|
@vagisha-nidhi this is good to go, thank you! Out of curiosity, will this just work or is there an accompanying change that needs to be done in vstest or otherwise? |
|
@tonerdo Yeah. There have been changes in vstest which we have made but waiting on https://github.com/dotnet/cli to release with the latest changes. This might take a week. I will update you with that. We should be able to release the nuget once that is done. |
|
@vagisha-nidhi ok thanks. Can you please point me to the changes in the two repos, for my learning benefit |
|
@tonerdo Sure. Dotnet cli : These changes are going in dotnet cli in 16.1.0 release of test platform. TP insertion here dotnet/cli#11312 |
src/coverlet.collector/InProcDataCollection/CoverletInProcDataCollector.cs
Outdated
Show resolved
Hide resolved
src/coverlet.collector/InProcDataCollection/CoverletInProcDataCollector.cs
Outdated
Show resolved
Hide resolved
src/coverlet.collector/InProcDataCollection/CoverletInProcDataCollector.cs
Show resolved
Hide resolved
src/coverlet.collector/InProcDataCollection/CoverletInProcDataCollector.cs
Outdated
Show resolved
Hide resolved
| { | ||
| // Ignore exceptions and continue with the unload | ||
| if (EqtTrace.IsWarningEnabled) | ||
| // Throw any exception if unload fails |
MarcoRossignoli
left a comment
There was a problem hiding this comment.
LGTM thank's @vagisha-nidhi!
|
@tonerdo we can merge! |
|
@vagisha-nidhi I would like to test locally but I think we need to wait for VSTests PRs? |
@MarcoRossignoli You can test locally. Get the dlls from https://www.nuget.org/packages/Microsoft.TestPlatform/ version 16.1.0. You can replace these dlls in dotnet sdk folder and run Please let me know if you face any issues. |
@MarcoRossignoli This might not work I just checked. Else, you can pull the latest master from vstest, build it, and you will find netcore dlls in artifacts/Debug/netcoreapp2.0 folder. Replace these in dotnet sdk. |
Ok I'll do some test on my local with fresh sdk. |
|
@vagisha-nidhi I tried but i get exception I copied artifacts/Debug/netcoreapp2.0 to dotnet\sdk\3.0.100-preview6-012013 |
@MarcoRossignoli Copy everything except Microsoft.DotNet.PlatformAbstractions and Microsoft.Extensions.DependencyModel. This error has something to do with version mismatch of the assembly, which are not part of vstest. |
|
@vagisha-nidhi another unrelated question...is there a way inside VS to "Set test as startup" and launch debug with F5? |
I am not sure if such an option is available. |
Integration with VSTest
Implementation details and user documentation here : #402
Overview of Implementaion :
a. Instrumenting modules in
OnSessionStartofCoverletCoverageDataCollectorb. Collecting coverage report in
OnSessionEndofCoverletCoverageDataCollectorc. Sending coverage report back to test platform in
OnSessionEndcontributes to #395